1. Technical Field
The present invention generally relates to a data writing method, in particular, to a data writing method for a rewritable non-volatile memory module, a memory controller and a memory storage device using the method.
2. Description of Related Art
Along with the widespread of digital cameras, cell phones, and MP3 in recently years, the consumer' demand to storage media has increased drastically. Rewritable non-volatile memory module (e.g. flash memory) is one of the most adaptable storage media to portable electronic products (e.g. digital cameras mentioned above) due to its many characteristics such as data non-volatility, low power consumption, small volume, non-mechanical structure, and fast access speed.
In general, the rewritable non-volatile memory module includes a plurality of physical blocks which part of the physical blocks is configured to map to a plurality of logical blocks. When a host system wants to access the rewritable non-volatile memory module, the host system would transmit a command which is used to access the logical blocks to the memory controller which controls the rewritable non-volatile memory module. In the conventional technology, a physical block is considered as a basic unit when the rewritable non-volatile memory module is managed by the memory controller. When a file data is stored and scattered into a plurality of logical blocks and a program failure occurs while the execution of the write command, an issue of the update completeness of file data will arise. In detail, the logical blocks where the write command is completed will be mapped to the physical blocks that are stored with new data. However, the logical blocks where the program fail is occurred will still be mapped to the physical blocks which contain old data. Therefore, the stored file data in the logical blocks will be incomplete (only parts of data are updated and other parts are not). Hence, the issue of how to ensure the update completeness of data stored in a plurality of logical blocks is the concern for those skilled in the art.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.